package com.jokey.vue.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jokey.vue.model.Menu;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2021/11/25 21:05
 * @version: v1.0.0
 */
@Component
public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * 获取HR权限菜单
     *
     * @param hrId
     * @return
     */
    List<Menu> getMenusByHrId(Integer hrId);

    /**
     * 获取菜单角色
     *
     * @return
     */
    List<Menu> getAllMenusWithRole();

    /**
     * 获取所有菜单
     *
     * @return
     */
    List<Menu> getAllMenus();

    /**
     * 根据角色获取菜单
     *
     * @param rId
     * @return
     */
    List<Integer> getMidsByRid(Integer rId);
}
